libxc: wrappers for XENMEM {increase,decrease}_reservation and populate_physmap
authorIan Campbell <ian.campbell@citrix.com>
Mon, 18 Oct 2010 15:54:42 +0000 (16:54 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 18 Oct 2010 15:54:42 +0000 (16:54 +0100)
commit2674a296982598b97ffdd90fa407e4cdd1df3e13
treeed8d08336c8bc9ea7a82ba3975d5074e1766b185
parentf5c808b428244f42b2310ddf173c624d9a2a842c
libxc: wrappers for XENMEM {increase,decrease}_reservation and populate_physmap

Currently the wrappers for these hypercalls swallow partial success
and return failure to the caller.

In order to use these functions more widely instead of open-coding
uses of XENMEM_* and xc_memory_op add variants which return the actual
hypercall result.

Therefore add the following functions:
  xc_domain_increase_reservation
  xc_domain_decrease_reservation
  xc_domain_populate_physmap
and implement the existing semantics using these new functions as
  xc_domain_increase_reservation_exact
  xc_domain_decrease_reservation_exact
  xc_domain_populate_physmap_exact
replacing the existing xc_domain_memory_* functions.

Use these new functions to replace all open coded uses of
XENMEM_increase_reservation, XENMEM_decrease_reservation and
XENMEM_populate_physmap.

Also rename xc_domain_memory_*_pod_target to xc_domain_*_pod_target
for consistency.

Temporarily add a compatibility macro for
xc_domain_memory_populate_physmap to allow time for qemu to catch up.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxc/ia64/xc_ia64_hvm_build.c
tools/libxc/ia64/xc_ia64_linux_restore.c
tools/libxc/xc_dom_ia64.c
tools/libxc/xc_dom_x86.c
tools/libxc/xc_domain.c
tools/libxc/xc_domain_restore.c
tools/libxc/xc_hvm_build.c
tools/libxc/xc_private.c
tools/libxc/xenctrl.h
tools/libxl/libxl.c
tools/python/xen/lowlevel/xc/xc.c